package aspect;

import java.util.HashMap;

public class AspectFilter {
	public static String[][] aspects = {{"Unemployment"},{"unemployment", "jobs","job","veterans","work", "wpix","joblessness","labour","unemployed","wage","worker","workers","salaried","self-employed","keystone"}, 
            {"Tax"},{"taxpayer", "tax", "payroll", "payment", "charge", "taxes","work", "wpix", "budget"},
            {"War on terror"},{"bin","laden","seal","golf","commander","navy","seal","muslim","al-haddad","rahman","war","osama","seals","bush","militant","al-qaeda","9//11","terrorist","afghnistan","bombings","crusade"},
            {"Enonomy"},{"wall","street","occupy","dimon","chase","bank"},
            {"Welfare"},{"welfare","assistance","aid","health","care"},
            {"Abortion"},{"abortion","pregnancy","fetus","embryo","miscarriage","contraceptive"},
            {"Deplomacy"},{"binyamin","netanyahu","israel","palestinian","israeli","jewish","G20", "sarcozy"},
            {"Housing"},{"homeless","mortgage"},
            {"Education"},{"education","students","teachers","school"},
            {"Drug"},{"Marijuana"},
            {"Media"},{"cnn","reuters","abc","bbc","gox","wsj" },
            {"Sexual Harassment"},{"Sexual","Harassment"},
            {"Environment"},{"eco","green"},
            {"Nuclear"},{"iran","nuclear"},
            {"Resources"},{"pipeline","drilling","energy","drill"},
            {"Competitors"},{"risk","romney","herman","cain","clinton","gop","republican","congress"}
	};

	
	public String isProperAspect(String aspect) {
		
		String result = "";
		boolean hasKeyword = false;
		
		for (int i = 1; i < aspects.length; i=i+2) {
			for (int j = 0; j < aspects[i].length; j++) {
				if (aspect.equals(aspects[i][j])) {
					hasKeyword = true;
					result = aspects[i - 1][0];
				}
			}
		}
		return result;
	}

}
